package top.hzy520.log.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.hzy520.log.dao.SysLoginLogMapper;
import top.hzy520.log.dao.SysOperationLogMapper;
import top.hzy520.log.entity.SysLoginLog;
import top.hzy520.log.entity.SysOperationLog;

import java.util.List;

/**
 * @Author: HouZeYu
 * @Description:
 * @Date: Created in 10:03 2018/9/20
 */
@Service
public class LogServiceImpl implements LogService {
    @Autowired
    private SysLoginLogMapper sysLoginLogMapper;
    @Autowired
    private SysOperationLogMapper sysOperationLogMapper;

    @Override
    public int queryLoginLogAllCount() {
        return sysLoginLogMapper.queryLoginLogAllCount();
    }

    @Override
    public List<SysLoginLog> paginationQueryLoginLog(int offset, int limit) {
        return sysLoginLogMapper.paginationQueryLoginLog(offset,limit);
    }

    @Override
    public void deleteLoginLog(List<SysLoginLog> loginLogList) {
      sysLoginLogMapper.deleteLoginLog(loginLogList);
    }

    @Override
    public int queryOperationLogAllCount() {
        return sysOperationLogMapper.queryOperationLogAllCount();
    }

    @Override
    public List<SysOperationLog> paginationQueryOperationLog(int offset, int limit) {
        return sysOperationLogMapper.paginationQueryOperationLog(offset, limit);
    }

    @Override
    public void deleteOperationLog(List<SysOperationLog> operationLogList) {
        sysOperationLogMapper.deleteOperationLog(operationLogList);
    }
}
